// 定义请求的地址
// 使用的服务模式 如果使用VUE本地后台那么改为1即可
const USE_TYPE = 1

// 使用本地的vue服务=1
const VUE_SERVER = {
  baseURL: '/',
  recommend: 'api/getRecommend',
  singerList: 'api/getSingerList',
  singerDetail: 'api/getSingerDetail',
  processSongs: 'api/getSongsUrl'
}

// 使用自定义的本地PHP服务=2
const PHP_SERVER = {
  baseURL: 'http://192.168.1.105/qqmusic-next/',
  recommend: 'getRecommend.php',
  singerList: 'getSingerList.php',
  singerDetail: 'getSingerDetail.php',
  processSongs: 'getSongsUrl.php'
}

// 最终线上访问接口地址=3
const ONLINE_SERVER = {
  baseURL: 'http://192.168.1.105/qqmusic-next/',
  recommend: 'getRecommend.php',
  singerList: 'getSingerList.php',
  singerDetail: 'getSingerDetail.php',
  processSongs: 'getSongsUrl.php'
}

let server = {}
switch (USE_TYPE) {
  case 1:
    server = VUE_SERVER
    break
  case 2:
    server = PHP_SERVER
    break
  case 3:
    server = ONLINE_SERVER
    break
}

const SERVER = server

export default SERVER
